package com.ruoyi.system.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.ruoyi.system.domain.YhCommissionRecord;
import com.ruoyi.system.domain.vo.YhCommissionRecordVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 佣金记录Mapper接口
 * 
 * @author ruoyi
 * @date 2023-06-06
 */
public interface YhCommissionRecordMapper extends BaseMapper<YhCommissionRecord>
{
    /**
     *
     * 用户查询自己的
     */
    @Select("SELECT c.*, m.nick_name, m.face, m.create_time binding_time FROM yh_commission_record c LEFT JOIN yh_member m on c.child_member_id = m.id ${ew.customSqlSegment}")
    List<YhCommissionRecordVo> listByMember(@Param(Constants.WRAPPER) Wrapper<YhCommissionRecord> queryWrapper);
}
